
<template>
  <div class="container">
    <websiteTop v-if="$route.path == '/home/vedio'"></websiteTop>
    <publicVid v-else class="publicVideo" ></publicVid>
    <div class="content">
      <router-view></router-view>
    </div>
    <el-button class="globalButton" type="warning" @click="handleButtonClick">智能助手</el-button>
  </div>
  <assiant v-model:visible="assiantVisible"></assiant>
</template>

<script setup>
  import publicVid from './components/publicVid/index.vue'
  import assiant from '@/components/global/assiant.vue'
  import {useRoute} from 'vue-router'
  import {onMounted,ref} from 'vue'
  import {useAlertsStore} from "@/store/modules/home.js";
  import {ElMessage} from "element-plus";
  let $route = useRoute()
  let useAlerts = useAlertsStore()

  const assiantVisible = ref(false)
  const handleButtonClick = () => {
    if(useAlerts.UserInfo.user){
      assiantVisible.value = true
    }else {
      ElMessage.warning('该功能登录后使用!!!')
    }
  }
</script>


<style  lang="less">
  .publicVideo{
    margin-top: -10px;
  }
  body{
    background:url('https://uniapp213.oss-cn-beijing.aliyuncs.com/image/bjt.webp') no-repeat;
    background-size: cover;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
.container {
  display: flex;
  flex-direction: column;
  .content {
    padding-top: 65px;
    width: 1200px;
    height: 100vh;
  }
}
  .globalButton {
    position: fixed;
    width: 30px;
    height: 150px !important;
    left: 0;
    top: 250px;
    writing-mode: vertical-rl; /* 从右到左垂直排列文字 */
  }
</style>
